home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ian & Stuart's Australian Mac: Not for Sale
/
Another.not.for.sale (Australia).iso
/
fade into you
/
getting there
/
Apps
/
MOO-1.7.6.src
/
inc
/
config.h
< prev
next >
Wrap
Text File
|
1994-11-02
|
11KB
|
258 lines
/******************************************************************************
Copyright (c) 1992 Xerox Corporation. All rights reserved.
Portions of this code were written by Stephen White, aka ghond.
Use and copying of this software and preparation of derivative works based
upon this software are permitted. Any distribution of this software or
derivative works must comply with all applicable United States export
control laws. This software is made available AS IS, and Xerox Corporation
makes no warranty about the software, its performance or its conformity to
any specification. Any person obtaining a copy of this software is requested
to send their name and post office or electronic mail address to:
Pavel Curtis
Xerox PARC
3333 Coyote Hill Rd.
Palo Alto, CA 94304
Pavel@Xerox.Com
*****************************************************************************/
/* If you're looking at this as `raw_config.h.in', then this file is full of
* `#undef' preprocessor directives. The `configure' command, which generates
* `raw_config.h' from `raw_config.h.in', replaces appropriate ones of those
* `#undef's with `#define's, depending upon characteristics of the operating
* system. The Makefile then constructs `config.h' from `raw_config.h' by
* stripping out all of the remaining `#undef' lines.
*/
#ifndef Config_H
#define Config_H 1
/* Some systems require that certain preprocessor symbols be defined in order
* for certain pieces of the C library to be available. If one of the
* following is defined, then your system is one such.
*/
#define _ALL_SOURCE
/* The following symbols describe whether or not certain functions are declared
* in header files on your system and, if so, where. If, on your system, the
* functions `memcmp', `memcpy', etc. are not declared in <string.h>, but are
* instead in <memory.h>, then NEED_MEMORY_H will be defined. Similarly, if
* `malloc', `free', etc. are not declared in <stdlib.h>, but are instead in
* <malloc.h>, then NEED_MALLOC_H will be defined. If your system has the file
* </sys/bsdtypes.h>, then NEED_BSDTYPES_H will be defined.
*
* The various NDECL_* symbols are defined if the named function is not
* declared in its standard place, which is given in a comment after each
* symbol. In several of the cases below, the absence of a declaration for the
* named function is taken in the server code to imply the similar absence of
* declarations for several other related functions.
*/
#define NEED_MEMORY_H 0
#define NEED_MALLOC_H 0
#define NEED_BSDTYPES_H 0
#define NEED_SELECT_H 0
#define NDECL_FCNTL 0 /* <fcntl.h> */
#define NDECL_HTONL 1 /* <netinet/in.h> */
#define NDECL_IOCTL 1 /* <sys/ioctl.h> */
#define NDECL_POLL 1 /* <poll.h> */
#define NDECL_KILL 1 /* <signal.h> */
#define NDECL_SIGEMPTYSET 1 /* <signal.h> */
#define NDECL_SIGPROCMASK 1 /* <signal.h> */
#define NDECL_SIGRELSE 1 /* <signal.h> */
#define NDECL_ACCEPT 1 /* <sys/socket.h> */
#define NDECL_BIND 1 /* <sys/socket.h> */
#define NDECL_SHUTDOWN 1 /* <sys/socket.h> */
#define NDECL_FSTAT 1 /* <sys/stat.h> */
#define NDECL_FCLOSE 0 /* <stdio.h> */
#define NDECL_PERROR 0 /* <stdio.h> */
#define NDECL_REMOVE 0 /* <stdio.h> */
#define NDECL_VFPRINTF 1 /* <stdio.h> */
#define NDECL_RANDOM 1 /* <stdlib.h> */
#define NDECL_SRANDOM 0 /* <stdlib.h> */
#define NDECL_STRTOL 1 /* <stdlib.h> */
#define NDECL_BZERO 1 /* <string.h> */
#define NDECL_MEMCPY 0 /* <string.h> */
#define NDECL_MEMSET 0 /* <string.h> */
#define NDECL_STRERROR 0 /* <string.h> */
#define NDECL_GETITIMER 1 /* <sys/time.h> */
#define NDECL_SETITIMER 1 /* <sys/time.h> */
#define NDECL_SELECT 1 /* <sys/time.h> */
#define NDECL_STRFTIME 1 /* <time.h> */
#define NDECL_TIME 0 /* <time.h> */
#define NDECL_TZNAME 1 /* <time.h> */
#define NDECL_T_OPEN 1 /* <tiuser.h> */
#define NDECL_FORK 0 /* <unistd.h> */
#define NDECL_WAITPID 1 /* <sys/wait.h> */
/* Some systems declare bzero() in <stdlib.h> instead of in <string.h>. */
#define BZERO_IN_STDLIB_H 0
/* Some header files are only present on certain kinds of UNIXes (e.g., BSD,
* System V, or POSIX). The following symbols are defined only if the named
* header file exists on your system.
*/
#define HAVE_STDLIB_H 1
#define HAVE_UNISTD_H 0
/* Some POSIX-standard typedefs are not present in some systems. The following
* symbols are defined as aliases for their usual definitions if they are not
* defined on your system.
*/
#define pid_t long
#define mode_t long
/* To implement the LambdaMOO built-in function `ctime()', which converts a
* number of seconds since the POSIX `epoch' into a human-readable time/date
* string, the server code needs to be able to find out the name of the local
* time zone. This information is available in an obscure way from the ANSI
* standard function `strftime()', but many systems still don't implement it.
* The server has code to cope with this case, though, if your system maintains
* the time-zone name in one of two common places. Appropriate ones of the
* following symbols will be defined to tell the server how to get time-zone
* information on your system.
*/
#define HAVE_STRFTIME 1
#define TM_IN_SYS_TIME 0
#define HAVE_TM_ZONE 0
#define HAVE_TZNAME 0
/* Some compilers `almost' conform to the ANSI C standard, in that they provide
* the vast majority of the features and constructs used by the server code,
* but one common failing with which the code can cope is the lack of support
* for the `const' keyword. If your compiler doesn't support `const', then
* this symbol will be defined as a macro that expands into nothing, thus
* eliding all uses of the keyword in the code.
*/
/* Some sites have installed GCC improperly or incompletely, thereby requiring
* the server to be compiled with the `-traditional' switch. That disables the
* `const', `volatile' or `signed' keywords, which we need. Thus, for GCC, we
* do these little substitutions to always refer to its `hidden' names for
* these keywords.
*/
#ifdef __GNUC__
# define const __const__
# define volatile __volatile__
# define signed __signed__
#endif
/* Certain functions used by the server are `optional', in the sense that the
* server can provide its own definition if necessary. In some cases, there
* are a number of common ways to do the same thing, differing by system type
* (e.g., BSD, System V, or POSIX). The following symbols are defined if your
* system provides the named functions.
*/
#define HAVE_MKFIFO 0
#define HAVE_REMOVE 1
#define HAVE_RENAME 1
#define HAVE_SELECT 0
#define HAVE_POLL 0
#define HAVE_STRERROR 1
#define HAVE_STRTOUL 0
#define HAVE_RANDOM 0
#define HAVE_LRAND 48
#define HAVE_WAITPID 0
#define HAVE_WAIT 2
#define HAVE_SIGEMPTYSET 0
#define HAVE_SIGPROCMASK 0
#define HAVE_SIGSETMASK 0
#define HAVE_SIGRELSE 0
/* It used to be very much the fashion in UNIX programming to make use of
* certain standard header files depend on the programmer having #include'd
* other standard header files first. This is obviously losing and, amazingly,
* is also losing favor, replaced by the notion that every header file should
* #include whatever other headers it requires, and that all headers should
* take steps to ensure that they are not #include'd more than once if that
* would be bad. The following symbols are defined if the named header files
* fail to adhere to the new style; the server code makes up for them by doing
* its own #include of the usual prerequisite.
*/
#define ARPA_INET_H_NEEDS_HELP 0
#define SIGNAL_H_NEEDS_HELP 0
#define SYS_SOCKET_H_NEEDS_HELP 0
#define TIME_H_NEEDS_HELP 0
/* Version 2 of the GNU C compiler includes `built-in' declarations for a
* number of standard functions from the ANSI header file <string.h>.
* Unfortunately, some systems declare these functions differently (and
* non-standardly) in their native header files, generating a warning about the
* conflict from GCC. If this is the case on your system, the following symbol
* will be defined, indicating that the server code should avoid your system's
* <string.h> file, using its own version instead.
*/
#define USE_OWN_STRING_H 0
/* On some systems, notably AIX, both <sys/ioctl.h> and <stropts.h> define the
* internal macro `_IO' in compatible but different ways. This means that no
* program can #include both files without getting an error. If this is so on
* your machine, then the following symbol will be defined and the server code
* will carefully #undef _IO between inclusions of the two files.
*/
#define UNDEF_IO_IN_STROPTS_H 0
/* The NS_SYSV/NP_LOCAL networking configuration of the server makes use of an
* operating system feature called `FIFO's for communication with clients of
* the MOO. In order to do this, the server needs some way to tell whether or
* not there's something ready to be read on a given FIFO at any given time.
* The BSD function `select()' usually works if it's available, but the System
* V equivalent, `poll()', sometimes does and sometimes doesn't, depending on
* the system. The POSIX definers, of course, took the coward's way out and
* didn't define any such function at all. On many systems, however, you can
* use the `fstat()' function to determine the number of bytes of data in a
* FIFO; this allows the use of a somewhat crocky but workable substitute for
* either `poll()' or `select()'. The following symbols are defined if the
* given function works to perform the necessary operation on FIFOs on your
* system.
*/
#define FSTAT_WORKS_ON_FIFOS 0
#define POLL_WORKS_ON_FIFOS 0
#define SELECT_WORKS_ON_FIFOS 0
/* The POSIX standard specifies a nice, simple, reliable method for performing
* non-blocking I/O, and a lot of systems actually implement it. Some systems,
* though (notably Ultrix 4.1), misleadingly define the preprocessor symbols
* that might make you *think* that they've implemented it, but really they
* don't. This symbol is defined if POSIX-style non-blocking actually works on
* your system.
*/
#define POSIX_NONBLOCKING_WORKS 0
#endif /* !Config_H */
/* $Log: config.h.in,v $
* Revision 1.5 1992/10/28 01:57:38 pavel
* Changed NDECL_VPRINTF to NDECL_VFPRINTF, which is the one we care about...
*
* Revision 1.4 1992/10/23 23:11:21 pavel
* Added copyright notice.
*
* Revision 1.3 1992/10/23 19:19:22 pavel
* Added NEED_MALLOC_H, NDECL_{SIGEMPTYSET,FSTAT,PERROR,REMOVE,VPRINTF,MEMSET,
* FORK,WAITPID}, SELECT_WORKS_ON_FIFOS, and POSIX_NONBLOCKING_WORKS.
*
* Revision 1.2 1992/10/21 03:12:59 pavel
* Fixed up the comment leader string for this file.
*
* Revision 1.1 1992/10/21 03:06:52 pavel
* Initial RCS-controlled version.
*/
/* Local Variables: */
/* mode: c */
/* End: */